package modelLayer;

/**
 * A loan
 * 
 * @author Gruppe E
 * @version 1.0
 */
public class Loan
{
    private Person person;
    private Copy copy;
    private String id;
    private String borrowDate;
    private String period;
    private boolean state;

    /**
     * Constructor for objects of class Loan
     */
    public Loan(Person person, Copy copy, String id, String borrowDate, String period)
    {
        this.person = person;
        this.copy = copy;
        this.id = id;
        this.borrowDate = borrowDate;
        this.period = period;
        state = true;
    }

    /**
     * Method getState
     *
     * @return The return value
     */
    public boolean getState()
    {
        return state;
    }

    /**
     * Method setStateFalse
     *
     */
    public void setStateFalse()
    {
        state = false;
    }

    //     public void setPerson(Person person)
    //     {
    //         this.person = person;
    //     }
    //     
    //     public void setCopy(Copy copy)
    //     {
    //         this.copy = copy;
    //     }

    /**
     * Method setId
     *
     * @param id A parameter
     */
    public void setId(String id)
    {
        this.id = id;
    }

    /**
     * Method setBorrowDate
     *
     * @param borrowDate A parameter
     */
    public void setBorrowDate(String borrowDate)
    {
        this.borrowDate = borrowDate;
    }

    /**
     * Method setPeriod
     *
     * @param period A parameter
     */
    public void setPeriod(String period)
    {
        this.period = period;
    }

    /**
     * Method getPerson
     *
     * @return The return value
     */
    public Person getPerson()
    {
        return person;
    }

    /**
     * Method getCopy
     *
     * @return The return value
     */
    public Copy getCopy()
    {
        return copy;
    }

    /**
     * Method getId
     *
     * @return The return value
     */
    public String getId()
    {
        return id;
    }

    /**
     * Method getBorrowDate
     *
     * @return The return value
     */
    public String getBorrowDate()
    {
        return borrowDate;
    }

    /**
     * Method getPeriod
     *
     * @return The return value
     */
    public String getPeriod()
    {
        return period;
    }
}
